<% layout('/layouts/default.html', {title: 'ch_my_task管理', libs: ['dataGrid']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header">
			<div class="box-title">
				<i class="fa icon-notebook"></i> ${text('ch_my_task管理')}
			</div>
			<div class="box-tools pull-right">
				<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>
				<% if(hasPermi('ch:chMyTask:edit')){ %>
					<a href="${ctx}/ch/chMyTask/form" class="btn btn-default btnTool" title="${text('新增ch_my_task')}"><i class="fa fa-plus"></i> ${text('新增')}</a>
				<% } %>
				<a href="#" class="btn btn-default" id="btnSetting" title="${text('设置')}"><i class="fa fa-navicon"></i></a>
			</div>
		</div>
		<div class="box-body">
			<#form:form id="searchForm" model="${chMyTask}" action="${ctx}/ch/chMyTask/listData" method="post" class="form-inline hide"
					data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
				<div class="form-group">
					<label class="control-label">${text('项目名称/APP名称')}：</label>
					<div class="control-inline">
						<#form:input path="projectName" maxlength="255" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('标题')}：</label>
					<div class="control-inline">
						<#form:input path="title" maxlength="255" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('商家ID')}：</label>
					<div class="control-inline">
						<#form:input path="userId" maxlength="50" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('描述')}：</label>
					<div class="control-inline">
						<#form:input path="explainStr" maxlength="255" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('提交时常')}：</label>
					<div class="control-inline">
						<#form:input path="submitTimes" maxlength="10" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('审核时常')}：</label>
					<div class="control-inline">
						<#form:input path="examineTimes" maxlength="10" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('设备类型 0 不限 1安卓 2 IOS')}：</label>
					<div class="control-inline">
						<#form:input path="devType" maxlength="2" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('做单方式')}：</label>
					<div class="control-inline">
						<#form:input path="zuodanNumType" maxlength="2" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('用户单价')}：</label>
					<div class="control-inline">
						<#form:input path="price" maxlength="8" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('悬赏单价')}：</label>
					<div class="control-inline">
						<#form:input path="oldPrice" maxlength="8" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('做单步骤')}：</label>
					<div class="control-inline">
						<#form:input path="buzhouList" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('创建时间/报名时间')}：</label>
					<div class="control-inline">
						<#form:input path="createTime" readonly="true" maxlength="20" class="form-control laydate width-datetime"
							dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('我的任务状态')}：</label>
					<div class="control-inline">
						<#form:input path="myTaskStatus" maxlength="10" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('0正常 1删除')}：</label>
					<div class="control-inline width-120">
						<#form:select path="status" dictType="sys_search_status" blankOption="true" class="form-control isQuick"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('未通过说明')}：</label>
					<div class="control-inline">
						<#form:input path="failExplain" maxlength="255" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('操作时间')}：</label>
					<div class="control-inline">
						<#form:input path="doTime" readonly="true" maxlength="20" class="form-control laydate width-datetime"
							dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('商家任务id')}：</label>
					<div class="control-inline">
						<#form:input path="taskId" maxlength="50" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('更新时间')}：</label>
					<div class="control-inline">
						<#form:input path="updateTime" readonly="true" maxlength="20" class="form-control laydate width-datetime"
							dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('悬赏人ID')}：</label>
					<div class="control-inline">
						<#form:input path="taskUserId" maxlength="50" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('任务类型')}：</label>
					<div class="control-inline">
						<#form:input path="taskType" maxlength="255" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('任务编号')}：</label>
					<div class="control-inline">
						<#form:input path="taskCode" maxlength="255" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('截止时间')}：</label>
					<div class="control-inline">
						<#form:input path="deadline" readonly="true" maxlength="20" class="form-control laydate width-datetime"
							dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('是否已读  0否 1是')}：</label>
					<div class="control-inline">
						<#form:input path="isRead" maxlength="2" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('结单前的状态')}：</label>
					<div class="control-inline">
						<#form:input path="myTaskStatusBefore" maxlength="10" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('小转帮用户数据id')}：</label>
					<div class="control-inline">
						<#form:input path="userDataId" maxlength="50" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('小转帮回传数据')}：</label>
					<div class="control-inline">
						<#form:input path="xzbCallback" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('小转帮任务ID')}：</label>
					<div class="control-inline">
						<#form:input path="xzbTaskId" maxlength="20" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('商家头像')}：</label>
					<div class="control-inline">
						<#form:input path="userHeadimgurl" maxlength="500" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('任务类型')}：</label>
					<div class="control-inline">
						<#form:input path="type" maxlength="2" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('小转帮状态')}：</label>
					<div class="control-inline">
						<#form:input path="xzbTaskStatus" maxlength="2" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('渠道ID')}：</label>
					<div class="control-inline">
						<#form:input path="channelId" maxlength="225" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('渠道用户ID')}：</label>
					<div class="control-inline">
						<#form:input path="channelUserId" maxlength="225" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('同步状态')}：</label>
					<div class="control-inline">
						<#form:input path="callbackStatus" maxlength="255" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
					<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
				</div>
			</#form:form>
			<table id="dataGrid"></table>
			<div id="dataGridPage"></div>
		</div>
	</div>
</div>
<% } %>
<script>
// 初始化DataGrid对象
$('#dataGrid').dataGrid({
	searchForm: $("#searchForm"),
	columnModel: [
		{header:'${text("项目名称/APP名称")}', name:'projectName', index:'a.project_name', width:150, align:"left", frozen:true, formatter: function(val, obj, row, act){
			return '<a href="${ctx}/ch/chMyTask/form?id='+row.id+'" class="btnList" data-title="${text("编辑ch_my_task")}">'+(val||row.id)+'</a>';
		}},
		{header:'${text("标题")}', name:'title', index:'a.title', width:150, align:"left"},
		{header:'${text("商家ID")}', name:'userId', index:'a.user_id', width:150, align:"left"},
		{header:'${text("描述")}', name:'explainStr', index:'a.explain_str', width:150, align:"left"},
		{header:'${text("提交时常")}', name:'submitTimes', index:'a.submit_times', width:150, align:"left"},
		{header:'${text("审核时常")}', name:'examineTimes', index:'a.examine_times', width:150, align:"left"},
		{header:'${text("设备类型 0 不限 1安卓 2 IOS")}', name:'devType', index:'a.dev_type', width:150, align:"center"},
		{header:'${text("做单方式")}', name:'zuodanNumType', index:'a.zuodan_num_type', width:150, align:"center"},
		{header:'${text("用户单价")}', name:'price', index:'a.price', width:150, align:"right", formatter: function(val, obj, row, act){
			return js.formatNumber(val, 2, false, ''); // 数值类型格式化 (原始数值, 小数位数, 是否千分位, 默认值，金额情况下设置0.00);
		}},
		{header:'${text("悬赏单价")}', name:'oldPrice', index:'a.old_price', width:150, align:"right", formatter: function(val, obj, row, act){
			return js.formatNumber(val, 2, false, ''); // 数值类型格式化 (原始数值, 小数位数, 是否千分位, 默认值，金额情况下设置0.00);
		}},
		{header:'${text("做单步骤")}', name:'buzhouList', index:'a.buzhou_list', width:150, align:"left"},
		{header:'${text("创建时间/报名时间")}', name:'createTime', index:'a.create_time', width:150, align:"center"},
		{header:'${text("我的任务状态")}', name:'myTaskStatus', index:'a.my_task_status', width:150, align:"left"},
		{header:'${text("0正常 1删除")}', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){
			return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text("未知")}', true);
		}},
		{header:'${text("未通过说明")}', name:'failExplain', index:'a.fail_explain', width:150, align:"left"},
		{header:'${text("操作时间")}', name:'doTime', index:'a.do_time', width:150, align:"center"},
		{header:'${text("商家任务id")}', name:'taskId', index:'a.task_id', width:150, align:"left"},
		{header:'${text("更新时间")}', name:'updateTime', index:'a.update_time', width:150, align:"center"},
		{header:'${text("悬赏人ID")}', name:'taskUserId', index:'a.task_user_id', width:150, align:"left"},
		{header:'${text("任务类型")}', name:'taskType', index:'a.task_type', width:150, align:"left"},
		{header:'${text("任务编号")}', name:'taskCode', index:'a.task_code', width:150, align:"left"},
		{header:'${text("截止时间")}', name:'deadline', index:'a.deadline', width:150, align:"center"},
		{header:'${text("是否已读  0否 1是")}', name:'isRead', index:'a.is_read', width:150, align:"left"},
		{header:'${text("结单前的状态")}', name:'myTaskStatusBefore', index:'a.my_task_status_before', width:150, align:"left"},
		{header:'${text("小转帮用户数据id")}', name:'userDataId', index:'a.user_data_id', width:150, align:"left"},
		{header:'${text("小转帮回传数据")}', name:'xzbCallback', index:'a.xzb_callback', width:150, align:"left"},
		{header:'${text("小转帮任务ID")}', name:'xzbTaskId', index:'a.xzb_task_id', width:150, align:"left"},
		{header:'${text("商家头像")}', name:'userHeadimgurl', index:'a.user_headimgurl', width:150, align:"left"},
		{header:'${text("任务类型")}', name:'type', index:'a.type', width:150, align:"left"},
		{header:'${text("小转帮状态")}', name:'xzbTaskStatus', index:'a.xzb_task_status', width:150, align:"left"},
		{header:'${text("渠道ID")}', name:'channelId', index:'a.channel_id', width:150, align:"left"},
		{header:'${text("渠道用户ID")}', name:'channelUserId', index:'a.channel_user_id', width:150, align:"left"},
		{header:'${text("同步状态")}', name:'callbackStatus', index:'a.callback_status', width:150, align:"left"},
		{header:'${text("操作")}', name:'actions', width:120, formatter: function(val, obj, row, act){
			var actions = [];
			//<% if(hasPermi('ch:chMyTask:edit')){ %>
				actions.push('<a href="${ctx}/ch/chMyTask/form?id='+row.id+'" class="btnList" title="${text("编辑ch_my_task")}"><i class="fa fa-pencil"></i></a>&nbsp;');
				actions.push('<a href="${ctx}/ch/chMyTask/delete?id='+row.id+'" class="btnList" title="${text("删除ch_my_task")}" data-confirm="${text("确认要删除该ch_my_task吗？")}"><i class="fa fa-trash-o"></i></a>&nbsp;');
			//<% } %>
			return actions.join('');
		}}
	],
	// 加载成功后执行事件
	ajaxSuccess: function(data){
		
	}
});
</script>